package com.ecust.ml.grid.common;

/**
 * 网格单元格
 * @author pleasebugme
 *
 */
public class GridCell {

	/**
	 * x坐标
	 */
	private int x;
	
	/**
	 * y坐标
	 */
	private int y;
	
	/**
	 * reward值
	 */
	private float reward;
	
	/**
	 * 序号（从0开始）
	 */
	private int index;
	
	/**
	 * 是否障碍物
	 */
	private boolean isObstacle;
	
	public GridCell(int x, int y) {
		new GridCell(-1, x, y, false, 0);
	}
	
	public GridCell(int x, int y, boolean isObstacle) {
		new GridCell(-1, x, y, isObstacle, 0);
	}
	
	public GridCell(int x, int y, float reward) {
		new GridCell(-1, x, y, false, reward);
	}
	
	public GridCell(int x, int y, boolean isObstacle, float reward) {
		new GridCell(-1, x, y, isObstacle, reward);
	}
	
	
	public GridCell(int index, int x, int y, boolean isObstacle, float reward) {
		this.x = x;
		this.y = y;
		this.isObstacle = isObstacle;
		this.reward = reward;
		this.index = index;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public float getReward() {
		return reward;
	}

	public void setReward(float reward) {
		this.reward = reward;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public boolean isObstacle() {
		return isObstacle;
	}

	public void setObstacle(boolean isObstacle) {
		this.isObstacle = isObstacle;
	}
	
	
}
